﻿using System.Text.Json.Serialization;

namespace GanFeng.Forest.WebApi.Objects
{
    /// <summary>
    /// 带重量的 API 结果
    /// </summary>
    public class WithWeightApiResult : ApiResult
    {
        /// <summary>
        /// 创建一个带重量的 API 结果
        /// </summary>
        /// <param name="code">错误代码</param>
        /// <param name="weight">重量值</param>
        public WithWeightApiResult(int code, double weight) : base(code)
        {
            Weight = weight;
        }
        /// <summary>
        /// 重量（KG）
        /// </summary>
        [JsonPropertyName("weight")]
        public double Weight { get; set; }
    }
}
